package com.koron.css2.electronicCred.Enum;

/**
 * 工程类型枚举类
 *
 * @author 杨嘉慧
 */
public enum ProjectTypeEunm {
    /**
     * 居民用水报装
     */
    CUS_WATER_INSTALLATION("1", 1,"10001"),

    /**
     * 企业用水报装
     */
    COMP_WATER_INSTALLATION("5", 1,"10002");

    /**
     * 工程类型编号
     */
    private final String projectType;

    /**
     * 政务服务业务类型编号
     */
    private final Integer busiType;

    /**
     * 政务服务id
     */
    private final String govServiceId;

    private ProjectTypeEunm(final String projectType, final Integer busiType, final String govServiceId) {
        this.projectType = projectType;
        this.busiType = busiType;
        this.govServiceId = govServiceId;
    }

    public static Integer getBusiType(String projectType) {
        ProjectTypeEunm[] govServiceEunms = values();
        for (ProjectTypeEunm projectTypeEunm : govServiceEunms) {
            if (projectTypeEunm.projectType().equals(projectType)) {
                return projectTypeEunm.busiType();
            }
        }
        return null;
    }

    public static String getGovServiceId(String projectType) {
        ProjectTypeEunm[] govServiceEunms = values();
        for (ProjectTypeEunm projectTypeEunm : govServiceEunms) {
            if (projectTypeEunm.projectType().equals(projectType)) {
                return projectTypeEunm.govServiceId();
            }
        }
        return null;
    }

    public String projectType() {
        return this.projectType;
    }

    public Integer busiType() {
        return this.busiType;
    }

    public String govServiceId() {
        return this.govServiceId;
    }
}
